apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  labels:
    app: coreos-koji-tagger
  name: coreos-koji-tagger
spec:
  replicas: 1
  selector:
    app: coreos-koji-tagger
  strategy:
    resources: {}
  template:
    metadata:
      labels:
        app: coreos-koji-tagger
      name: coreos-koji-tagger
    spec:
      containers:
      - env:
        - name: COREOS_KOJI_TAGGER_KEYTAB_FILE
          value: /etc/coreos-koji-tagger-keytab/koji-keytab
{% if env == "staging" %}
        - name: COREOS_KOJI_TAGGER_USE_STG
          value: "true"
        # Knobs you can change to point to whatever repo you want for testing
        # stage code. Feel free to fork/create your own repo to test with and
        # replace the values below. The repo must be set up with
        # https://apps.fedoraproject.org/github2fedmsg so that it can get
        # messages on the message bus when commits are made.
        - name: GITHUB_REPO_FULLNAME
          value: "coreos/fedora-coreos-config"
        - name: GITHUB_REPO_BRANCHES
          value: "refs/heads/testing-devel refs/heads/next-devel"
{% endif %}
        # sleep infinity is useful for debugging environment issues
        # comment out when not debugging
#       args: ['infinity']
#       command: ['/usr/bin/sleep']
        volumeMounts:
        - name: coreos-koji-tagger-keytab-volume
          mountPath: /etc/coreos-koji-tagger-keytab
          readOnly: true
        - name: coreos-koji-tagger-krb5-conf-volume
          mountPath: /etc/krb5.conf
          subPath: krb5.conf
          readOnly: true
        image: ""
        imagePullPolicy: IfNotPresent
        name: coreos-koji-tagger
        resources: {}
      volumes:
      - name: coreos-koji-tagger-keytab-volume
        secret:
          secretName: coreos-koji-tagger-keytab
          optional: true
      - name: coreos-koji-tagger-krb5-conf-volume
        configMap:
          name: coreos-koji-tagger-krb5-conf
      restartPolicy: Always
  test: false
  triggers:
  - type: ConfigChange
  - type: ImageChange
    imageChangeParams:
      automatic: true
      containerNames:
      - coreos-koji-tagger
      from:
        kind: ImageStreamTag
        name: coreos-koji-tagger-img:latest
